//
//  YTDanLi.m
//  单例
//
//  Created by qianfeng on 15/8/4.
//  Copyright (c) 2015年 qianfeng. All rights reserved.
//

#import "YTDanLi.h"

@implementation YTDanLi




//单例的实现   ＊＊＊＊＊特别重要！！！！
+(YTDanLi *)shareYTDanli{
    
    //首次使用类创建一个空的静态的对象
    static YTDanLi * danli =nil;
    
    //判断单例对象是否为空，如果为空才去创建
    if (!danli) {
        danli=[[YTDanLi alloc]init];
    }
    
    return danli;
}




-(void)setA:(int)a{
    _a=a;
}
-(void)setB:(float)b{
    _b=b;
}

-(int)getA{
    return _a;
}
-(float)getB{
    return _b;
}

@end
